package com.ekingstar.framework.domain;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * Function entity. @author MyEclipse Persistence Tools
 */
public class Function extends AbstractFunction implements java.io.Serializable {

	//类型
	public static Integer QUERY  = 1;
	public static Integer ADD  = 2;
	public static Integer VIEW  = 3;
	private Boolean canUse;
	private Boolean canGrant;
	public Boolean getCanUse() {
		return canUse;
	}
    
	private String text;
	private boolean checked = false;
	private String cls  = "Benz";
	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public String getCls() {
		return cls;
	}

	public void setCls(String cls) {
		this.cls = cls;
	}

	

	
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public void setCanUse(Boolean canUse) {
		this.canUse = canUse;
	}

	public Boolean getCanGrant() {
		return canGrant;
	}

	public void setCanGrant(Boolean canGrant) {
		this.canGrant = canGrant;
	}

	// Constructors
	
	private List canUseRoles;
	
	

	public List getCanUseRoles() {
		return canUseRoles;
	}

	public void setCanUseRoles(List canUseRoles) {
		this.canUseRoles = canUseRoles;
	}

	/** default constructor */
	public Function() {
	}

	/** minimal constructor */
	public Function(String id) {
		super(id);
	}

	private String parentName;
	private String parentId;
	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	/** full constructor */
	public Function(String id, String name, String addresss,
			Date lastUpdateDate, String updaterId, Date addDate,
			String adderId, String deleterId, Date deleteDate,
			Set TRoleFunctions) {
		super(id, name, addresss, lastUpdateDate, updaterId, addDate, adderId,
				deleterId, deleteDate, TRoleFunctions);
	}
	public boolean equals(Object other){
		if (! (other instanceof Function)) return false;
		Function fother = (Function)other;
		if (this.getId().equals(fother.getId())) return true;
		return false;
	}
}
